import request from "@/utils/request";

export interface LoginParams {
  username: string,
  password: string,
  phone: number
}



// 登录接口 /api/user/login
// T 定义返回值response的数据类型
export interface LoginResponse {
  realName: string
  roles: string[]
  token: string
  userId: number
}
export function userLogin<T>(data: LoginParams) {
  return request<T>({
    url: "api/admin/user/login",
    method: "post",
    data: data
  })
}
